<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of LibraryAcl
 *
 * @author mbamba
 */
class Model_LibraryAcl extends Zend_Acl{
    
    public function __construct() {
        $this->add(new Zend_Acl_Resource('authentification'));
        $this->add(new Zend_Acl_Resource('visiteur'));
        $this->add(new Zend_Acl_Resource('frais'));
        $this->add(new Zend_Acl_Resource('stat'));
        
        $this->addRole(new Zend_Acl_Role('user'));
        $this->addRole(new Zend_Acl_Role('admin'),'user');
        
        $this->allow('user','authentification');
        $this->allow('user','visiteur','index');
        $this->allow('admin','visiteur');
        $this->allow('user','frais','index');
        $this->allow('admin','frais');
        $this->allow('admin','stat');
    } 
    //put your code here
}
